<%--
  Created by IntelliJ IDEA.
  User: SK
  Date: 2024/6/29
  Time: 18:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
    <title>修改用户信息</title>
</head>
<body>
<h1 align="center">修改用户信息</h1>
<form action="edit" method="post" align="center">
    <table border="1">
        <tr>
            <td>ID:</td>
            <td><input type="text" name="id" value="${user.id}" readonly></td>
        </tr>
        <tr>
            <td>用户编码:</td>
            <td><input type="text" name="userCode" value="${user.userCode}"></td>
        </tr>
        <tr>
            <td>用户名:</td>
            <td><input type="text" name="userName" value="${user.userName}"></td>
        </tr>
        <tr>
            <td>密码:</td>
            <td><input type="password" name="userPassword" value="${user.userPassword}"></td>
        </tr>
        <tr>
            <td>性别:</td>
            <td>
                <select name="gender">
                    <option value="0" ${user.gender == 0 ? 'selected' : ''}>男</option>
                    <option value="1" ${user.gender == 1 ? 'selected' : ''}>女</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>生日:</td>
            <td><input type="date" name="birthday" value="<fmt:formatDate value="${user.birthday}" pattern="yyyy-MM-dd" />"></td>
        </tr>
        <tr>
            <td>邮箱:</td>
            <td><input type="email" name="email" value="${user.email}"></td>
        </tr>
        <tr>
            <td>电话:</td>
            <td><input type="text" name="phone" value="${user.phone}"></td>
        </tr>
        <tr>
            <td>地址:</td>
            <td><input type="text" name="address" value="${user.address}"></td>
        </tr>
        <tr>
            <td>用户角色:</td>
            <td><input type="text" name="userRole" value="${user.userRole}"></td>
        </tr>
        <tr>
            <td colspan="2" align="center"><input type="submit" value="更新用户"></td>
        </tr>
    </table>
</form>
</body>
</html>